package com.blueline.acme.rules.service.impl;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import com.blueline.acme.rules.service.DroolsService;
import com.blueline.acme.rules.service.DroolsUtilService;

@SuppressWarnings("restriction")
@Service
@Lazy(false)
public class DroolsServiceImpl implements DroolsService {
//	@Value("#{droolsServiceUtil}")
	@Autowired
	private DroolsUtilService droolsUtilService;

	@PostConstruct
	public void launchRules() {
		
	}

	public void afterPropertiesSet() throws Exception {
		// TODO Auto-generated method stub
		droolsUtilService.initializeKnowledgeSession();
		droolsUtilService.fireRulesUtilHalt();
	}

//	public Collection<TransientReminder> findCaseReminders() {
//		return droolsServiceUtil.droolsQuery("CaseReminderQuery",
//				"caseReminder", TransientReminder.class, null);
//	}
//
//	public Collection<TransientReminder> findClinicianReminders() {
//		return droolsServiceUtil.droolsQuery("ClinicianReminderQuery",
//				"clinicianReminder", TransientReminder.class, null);
//	}
}